# makefile

all: server client

rmi.o: rmi.c rmi.h
	gcc -std=c99 -c rmi.c

server.o: server.c echo.h
	gcc -std=c99 -DRMI_SERVER -c server.c

client.o: client.c echo.h
	gcc -std=c99 -c client.c

server: server.o rmi.o
	gcc -std=c99 server.o rmi.o -o server -lpthread

client: client.o rmi.o
	gcc -std=c99 client.o rmi.o -o client -lpthread

clean:
	rm -f *~ *.o client server